@echo off 

set baseDir=%cd%\..\..\..\
set protocPath=%baseDir%\tools\proto
set distGoPath=%baseDir%\server\trunk\branch_0\src\common\protocol
set distCsPath=%baseDir%\client\trunk\branch_0\
set cppPath=%baseDir%\server\trunk\branch_0\PhyService\PhysicalGame\protobuf

gen_inner_msg.exe --base_dir=%baseDir%
echo -----------------------------------------------------------
echo - - -
echo -
echo protoc
%protocPath%\protoc.exe   --gogofast_out=own_import_prefix=common/protocol/,%distGoPath%\msg login.proto
%protocPath%\protoc.exe   --gogofast_out=own_import_prefix=common/protocol/,%distGoPath%\msg battle.proto
%protocPath%\protoc.exe   --gogofast_out=own_import_prefix=common/protocol/,%distGoPath%\msg battle_team.proto
%protocPath%\protoc.exe   --gogofast_out=own_import_prefix=common/protocol/,%distGoPath%\msg msg_def.proto
%protocPath%\protoc.exe   --gogofast_out=own_import_prefix=common/protocol/,%distGoPath%\msg map.proto
%protocPath%\protoc.exe   --gogofast_out=own_import_prefix=common/protocol/,%distGoPath%\msg msg_inner.proto
%protocPath%\protoc.exe   --gogofast_out=own_import_prefix=common/protocol/,%distGoPath%\msg forward_inner.proto

::--gogofast_out=plugins=grpc
::--gorpc_out=plugins=grpc+gorpc
%protocPath%\protoc.exe   --gorpc_out=plugins=grpc+gorpc,own_import_prefix=common/protocol/,recover=1,%distGoPath%\msg msg_def_inner.proto
%protocPath%\protoc.exe   --gorpc_out=plugins=grpc+gorpc,own_import_prefix=common/protocol/,recover=1,%distGoPath%\msg session_inner.proto
%protocPath%\protoc.exe   --gorpc_out=plugins=grpc+gorpc,own_import_prefix=common/protocol/,recover=1,%distGoPath%\msg social_inner.proto
%protocPath%\protoc.exe   --gorpc_out=plugins=grpc+gorpc,own_import_prefix=common/protocol/,recover=1,%distGoPath%\msg user_inner.proto
%protocPath%\protoc.exe   --gorpc_out=plugins=grpc+gorpc,own_import_prefix=common/protocol/,recover=1,%distGoPath%\msg match_inner.proto
%protocPath%\protoc.exe   --gorpc_out=plugins=grpc+gorpc,own_import_prefix=common/protocol/,recover=1,%distGoPath%\msg room_inner.proto
%protocPath%\protoc.exe   --gorpc_out=plugins=grpc+gorpc,own_import_prefix=common/protocol/,recover=1,%distGoPath%\msg chat_inner.proto
%protocPath%\protoc.exe   --gorpc_out=plugins=grpc+gorpc,own_import_prefix=common/protocol/,recover=1,%distGoPath%\msg mail_inner.proto
%protocPath%\protoc.exe   --gorpc_out=plugins=grpc+gorpc,own_import_prefix=common/protocol/,recover=1,%distGoPath%\msg index_inner.proto
%protocPath%\protoc.exe   --gorpc_out=plugins=grpc+gorpc,own_import_prefix=common/protocol/,recover=1,%distGoPath%\msg info_inner.proto
%protocPath%\protoc.exe   --gorpc_out=plugins=grpc+gorpc,own_import_prefix=common/protocol/,recover=1,%distGoPath%\msg bill_inner.proto

%protocPath%\protoc.exe   --gorpc_out=plugins=grpc+gorpc,own_import_prefix=common/protocol/,%distGoPath%\physical physical_inner.proto
%protocPath%\protoc.exe   --gorpc_out=plugins=grpc+gorpc,own_import_prefix=common/protocol/,%distGoPath%\tbx tbx_inner.proto


%protocPath%\protoc.exe   -I=. --grpc_out=%cppPath% --plugin=protoc-gen-grpc=%protocPath%\grpc_cpp_plugin.exe physical_inner.proto
%protocPath%\protoc.exe   -I=. --cpp_out=%cppPath% physical_inner.proto

%protocPath%\protoc.exe   -I=. --cpp_out=%cppPath% tbx_inner.proto

%protocPath%\protoc.exe   --gogofast_out=own_import_prefix=common/protocol/,%distGoPath%\mq msg_queue_inner.proto


echo -
echo - - -
echo -----------------------------------------------------------
gen_msg_index.exe --base_dir=%baseDir%

echo -----------------------------------------------------------
process_pb.exe --base_dir=%baseDir%

echo " "
echo ========================= ALL DONE! =========================
@echo off
@ping 127.0.0.1 -n 15 >nul   